/**
 * @projectName: project02bywdmtz
 * @package: com.cskaoyan.controller
 * @className: WxCatelog
 * @author: 冉夏
 * @description: TODO
 * @date: 2022/12/31 11:55
 * @version: 1.8
 */

package com.cskaoyan.controller;

import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.vo.CategoryAllInfoVo;
import com.cskaoyan.bean.vo.WxCateLogVo;
import com.cskaoyan.service.WxCateLogService;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.Service;

@RequestMapping("wx/catalog")
@RestController
public class WxCateLogController {
    @Autowired
    WxCateLogService wxCateLogService;
    @GetMapping("current")
    public BaseRespVo getCateLog(Integer id){
        WxCateLogVo wxCateLogVo=wxCateLogService.getCateLogInfo(id);
        return BaseRespVo.ok(wxCateLogVo);

    }
    /**/
    @GetMapping("index")
    public BaseRespVo getAllCategory(){
        CategoryAllInfoVo categoryAllInfo =wxCateLogService.getCategoryAllInfo();
        return BaseRespVo.ok(categoryAllInfo);
    }


}
